package com.bestcem.xm.wallet.grpc.client.converter;

import com.bestcem.bp.xm.user.grpc.v1.services.OrgWalletConfig;
import com.bestcem.xm.wallet.grpc.client.converter.strategy.OrganizationWalletConfigGrpcConvertStrategy;
import com.bestcem.xm.wallet.grpc.client.dto.OrganizationWalletConfigDTO;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;
import org.mapstruct.NullValueCheckStrategy;

/**
 * 公司钱包配置转换类
 *
 * @author wangyunyun <yunyun.wang@idiaoyan.com>
 * @version v1.0
 * @date 2022/5/13 11:50
 */
@Mapper(componentModel = "spring", nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS)
public interface WalletConfigGrpcConvert extends OrganizationWalletConfigGrpcConvertStrategy {

    @Mappings({
            @Mapping(target = "rechargeLimit", source = "rechargeLimitValue")
    })
    OrganizationWalletConfigDTO orgWalletConfigGrpc2Dto(OrgWalletConfig orgWalletConfig);
}
